package com.mingqijia.gassafety.db.mapper;

import com.mingqijia.gassafety.db.entity.RunningStrategy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mingqijia.gassafety.db.entity.WarnStrategy;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 运行策略 Mapper 接口
 * </p>
 *
 * @author fei.zhang
 * @since 2023-12-13
 */
@Repository
public interface RunningStrategyMapper extends BaseMapper<RunningStrategy> {

    List<RunningStrategy> checkStrategies(@Param("spId") String spId , @Param("strategyType")Integer strategyType);

    List<RunningStrategy> selectByIdStrategyObjValues(@Param("spId")String spId,@Param("array") String[] array,
                                                      @Param("strategyObj")Integer strategyObj, @Param("id")Long id
            , @Param("strategyType")Integer strategyType);

    RunningStrategy selectWarnStrategyById(@Param("id")Long id);

    List<RunningStrategy> selectListByCondition(@Param("warnStrategy")RunningStrategy warnStrategy,
                                             @Param("splits")List<String> splits);
}
